{% extends "base.html" %}

{% block title4 %}
    active
{% endblock %}

{% block page-body %}
    <h1 class="page-header">数据修改</h1>

    <!--面板 开始-->
    <div class="panel panel-primary">
        <div class="panel-heading">基线加固</div>
        <div class="panel-body">
            <form class="form-inline" action="/edit_baseline/?myworkbaseline_id={{ baseline_obj.id }}" method="post">
                {% csrf_token %}
                <div class="form-group">
                    <label for="ip">IP</label>
                    <input name="ip" type="text" class="form-control" id="ip" value="{{ baseline_obj.ip }}">
                </div>


                <div class="form-group">
                    <label for="date">加固日期</label>
                    <input name="date" type="date" class="form-control" id="date"
                           value="{{ baseline_obj.date.isoformat }}">
                </div>


                <div class="form-group"><strong>选择系统版本</strong>
                    <select name="os" class="form-control">

                        {% for i in os %}
                            {% if baseline_obj.os_id == i.id %}
                                <option selected value="{{ baseline_obj.os_id }}">{{ baseline_obj.os.os }}</option>
                            {% else %}
                                <option value="{{ i.id }}">{{ i.os }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>
                </div>


                <button type="submit" class="btn btn-success">提交</button>
            </form>


        </div>
        <!--面板 结束-->
    </div>
{% endblock %}